package com.elephantgreen.util.zip;

import java.util.Hashtable;
/**
 * 
 * @author Bishan
 *
 */
public class UncompressedFile {

	String path;
	Hashtable<String, BinaryFileData> files = new Hashtable<String, BinaryFileData>();

	/**
	 * Create new object with the Zip file path and name.
	 * @param path new zip file location.
	 *
	 */
	public UncompressedFile(String path) {
		this.path = path;
	}

	public void addFile(BinaryFileData binaryFileData) {
		files.put(binaryFileData.fileName, binaryFileData);
	}

	public BinaryFileData getFile(String fileName) {
		return files.get(fileName);
	}

	public Hashtable<String, BinaryFileData> getFiles() {
		return files;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append("Path: " + path + "[ ");
		for (BinaryFileData b : files.values()) {
			sb.append("(" + b.toString() + ")");
		}
		sb.append("]");
		return sb.toString();
	}

}
